/* eslint-disable */
// @ts-ignore
import { queryOptions, useMutation } from '@tanstack/vue-query';
import type { DefaultError } from '@tanstack/vue-query';
import { request } from '@/utils/http/request';
import type { AxiosRequestConfig } from 'axios';
import type { RequestOptions as RequestOptionsType } from '/#/axios';
type RequestOptions = RequestOptionsType & AxiosRequestConfig;

import * as apis from './danganService';
import * as API from './types';

/** 群众查图申请详情 POST /api/dangan/liyong/shenqing/${param0} https://apifox.com/web/project/3535734/apis/api-123222473-run */
export function useSubmitShenqingIdMutation(options?: {
  onSuccess?: (value?: API.CommonResponseQueryRecordVO) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.submitShenqingId,
    onSuccess(data: API.CommonResponseQueryRecordVO) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 利用查询 POST /api/dangan/liyong/shenqing/all/page https://apifox.com/web/project/3535734/apis/api-123222472-run */
export function useQueryAllPageMutation(options?: {
  onSuccess?: (value?: API.CommonResponseTableDataInfo2QueryRecordVO) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.queryAllPage,
    onSuccess(data: API.CommonResponseTableDataInfo2QueryRecordVO) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 使用身份证查询房屋坐落-网签备案 POST /api/dangan/liyong/shenqing/fangwuzuoluo https://apifox.com/web/project/3535734/apis/api-126724125-run */
export function useSubmitShenqingFangwuzuoluoMutation(options?: {
  onSuccess?: (value?: API.CommonResponseWangQian) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.submitShenqingFangwuzuoluo,
    onSuccess(data: API.CommonResponseWangQian) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 群众查图申请详情(查询码) POST /api/dangan/liyong/shenqing/get_details_by_query_code https://apifox.com/web/project/3535734/apis/api-123222474-run */
export function useQueryShenqingGetDetailsByQueryCodeMutation(options?: {
  onSuccess?: (value?: API.CommonResponseQueryRecordVO) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.queryShenqingGetDetailsByQueryCode,
    onSuccess(data: API.CommonResponseQueryRecordVO) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 新增群众查图申请(现场) POST /api/dangan/liyong/shenqing/on_site https://apifox.com/web/project/3535734/apis/api-123222475-run */
export function useSubmitShenqingOnSiteMutation(options?: {
  onSuccess?: (value?: API.CommonResponseString) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.submitShenqingOnSite,
    onSuccess(data: API.CommonResponseString) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 利用登记(在线) POST /api/dangan/liyong/shenqing/online/page https://apifox.com/web/project/3535734/apis/api-123222470-run */
export function useQueryOnlinePageMutation(options?: {
  onSuccess?: (value?: API.CommonResponseTableDataInfo2QueryRecordVO) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.queryOnlinePage,
    onSuccess(data: API.CommonResponseTableDataInfo2QueryRecordVO) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 利用登记(现场) POST /api/dangan/liyong/shenqing/onsite/page https://apifox.com/web/project/3535734/apis/api-123222471-run */
export function useQueryOnsitePageMutation(options?: {
  onSuccess?: (value?: API.CommonResponseTableDataInfo2QueryRecordVO) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.queryOnsitePage,
    onSuccess(data: API.CommonResponseTableDataInfo2QueryRecordVO) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 使用身份证查询房屋坐落 POST /api/dangan/liyong/shenqing/realestlocation https://apifox.com/web/project/3535734/apis/api-123222467-run */
export function useSubmitShenqingRealestlocationMutation(options?: {
  onSuccess?: (value?: API.CommonResponseListString) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.submitShenqingRealestlocation,
    onSuccess(data: API.CommonResponseListString) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 新增群众查图申请(微信端) POST /api/dangan/liyong/shenqing/wx https://apifox.com/web/project/3535734/apis/api-123222468-run */
export function useSubmitShenqingWxMutation(options?: {
  onSuccess?: (value?: API.CommonResponseString) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.submitShenqingWx,
    onSuccess(data: API.CommonResponseString) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}

/** 群众查图申请分页查询（微信端） POST /api/dangan/liyong/shenqing/wx/page https://apifox.com/web/project/3535734/apis/api-123222469-run */
export function useQueryWxPageMutation(options?: {
  onSuccess?: (value?: API.CommonResponseTableDataInfo2QueryRecordVO) => void;
  onError?: (error?: DefaultError) => void;
}) {
  const { onSuccess, onError } = options || {};

  const response = useMutation({
    mutationFn: apis.queryWxPage,
    onSuccess(data: API.CommonResponseTableDataInfo2QueryRecordVO) {
      onSuccess?.(data);
    },
    onError(error) {
      onError?.(error);
    },
  });

  return response;
}
